package com.ecoolex.chinadutyfree.retailer.core.dao;

import org.apache.ibatis.annotations.Param;

import com.ecoolex.chinadutyfree.retailer.core.mapper.GoodsProductMapper;
import com.ecoolex.chinadutyfree.retailer.entity.GoodsProductExample;

public interface GoodsProductDAO extends GoodsProductMapper {
	
	Long sumStockNumberByExample(GoodsProductExample example);

	Long sumUsedStockNumberByExample(GoodsProductExample example);

	Long sumSoldNumberByExample(GoodsProductExample example);

	int resetUsedStockNumber(@Param("goodsProductId") Integer goodsProductId, @Param("updateUser") String updateUser);
	
	int addSoldNumber(@Param("goodsProductId") Integer goodsProductId, @Param("buyNumber") Integer buyNumber, @Param("updateUser") String updateUser);
}